.class public Lcom/vividsolutions/jts/io/WKTReader;
.super Ljava/lang/Object;
.source "WKTReader.java"


# instance fields
.field private geometryFactory:Lcom/vividsolutions/jts/geom/GeometryFactory;

.field private precisionModel:Lcom/vividsolutions/jts/geom/PrecisionModel;

.field private tokenizer:Ljava/io/StreamTokenizer;


# direct methods
.method public constructor <init>()V
    .locals 1

    .line 134
    new-instance v0, Lcom/vividsolutions/jts/geom/GeometryFactory;

    invoke-direct {v0}, Lcom/vividsolutions/jts/geom/GeometryFactory;-><init>()V

    invoke-direct {p0, v0}, Lcom/vividsolutions/jts/io/WKTReader;-><init>(Lcom/vividsolutions/jts/geom/GeometryFactory;)V

    return-void
.end method

.method public constructor <init>(Lcom/vividsolutions/jts/geom/GeometryFactory;)V
    .locals 0

    .line 143
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 144
    iput-object p1, p0, Lcom/vividsolutions/jts/io/WKTReader;->geometryFactory:Lcom/vividsolutions/jts/geom/GeometryFactory;

    .line 145
    invoke-virtual {p1}, Lcom/vividsolutions/jts/geom/GeometryFactory;->getPrecisionModel()Lcom/vividsolutions/jts/geom/PrecisionModel;

    move-result-object p1

    iput-object p1, p0, Lcom/vividsolutions/jts/io/WKTReader;->precisionModel:Lcom/vividsolutions/jts/geom/PrecisionModel;

    return-void
.end method

.method private getCoordinates()[Lcom/vividsolutions/jts/geom/Coordinate;
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/vividsolutions/jts/io/ParseException;
        }
    .end annotation

    .line 215
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextEmptyOrOpener()Ljava/lang/String;

    move-result-object v0

    const-string v1, "EMPTY"

    .line 216
    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    .line 217
    new-array v0, v0, [Lcom/vividsolutions/jts/geom/Coordinate;

    return-object v0

    .line 219
    :cond_0
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 220
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getPreciseCoordinate()Lcom/vividsolutions/jts/geom/Coordinate;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 221
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextCloserOrComma()Ljava/lang/String;

    move-result-object v1

    :goto_0
    const-string v2, ","

    .line 222
    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 223
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getPreciseCoordinate()Lcom/vividsolutions/jts/geom/Coordinate;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 224
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextCloserOrComma()Ljava/lang/String;

    move-result-object v1

    goto :goto_0

    .line 226
    :cond_1
    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v1

    new-array v1, v1, [Lcom/vividsolutions/jts/geom/Coordinate;

    .line 227
    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [Lcom/vividsolutions/jts/geom/Coordinate;

    return-object v0
.end method

.method private getNextCloser()Ljava/lang/String;
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/vividsolutions/jts/io/ParseException;
        }
    .end annotation

    .line 323
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextWord()Ljava/lang/String;

    move-result-object v0

    const-string v1, ")"

    .line 324
    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_0

    return-object v0

    .line 327
    :cond_0
    invoke-direct {p0, v1}, Lcom/vividsolutions/jts/io/WKTReader;->parseError(Ljava/lang/String;)V

    const/4 v0, 0x0

    throw v0
.end method

.method private getNextCloserOrComma()Ljava/lang/String;
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/vividsolutions/jts/io/ParseException;
        }
    .end annotation

    .line 305
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextWord()Ljava/lang/String;

    move-result-object v0

    const-string v1, ","

    .line 306
    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_1

    const-string v1, ")"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    goto :goto_0

    :cond_0
    const-string v0, ", or )"

    .line 309
    invoke-direct {p0, v0}, Lcom/vividsolutions/jts/io/WKTReader;->parseError(Ljava/lang/String;)V

    const/4 v0, 0x0

    throw v0

    :cond_1
    :goto_0
    return-object v0
.end method

.method private getNextEmptyOrOpener()Ljava/lang/String;
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/vividsolutions/jts/io/ParseException;
        }
    .end annotation

    .line 287
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextWord()Ljava/lang/String;

    move-result-object v0

    const-string v1, "EMPTY"

    .line 288
    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_1

    const-string v1, "("

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    goto :goto_0

    :cond_0
    const-string v0, "EMPTY or ("

    .line 291
    invoke-direct {p0, v0}, Lcom/vividsolutions/jts/io/WKTReader;->parseError(Ljava/lang/String;)V

    const/4 v0, 0x0

    throw v0

    :cond_1
    :goto_0
    return-object v0
.end method

.method private getNextNumber()D
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/vividsolutions/jts/io/ParseException;
        }
    .end annotation

    .line 261
    iget-object v0, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    invoke-virtual {v0}, Ljava/io/StreamTokenizer;->nextToken()I

    move-result v0

    const/4 v1, -0x3

    if-ne v0, v1, :cond_0

    .line 266
    :try_start_0
    iget-object v0, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    iget-object v0, v0, Ljava/io/StreamTokenizer;->sval:Ljava/lang/String;

    invoke-static {v0}, Ljava/lang/Double;->parseDouble(Ljava/lang/String;)D

    move-result-wide v0
    :try_end_0
    .catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0

    return-wide v0

    .line 269
    :catch_0
    new-instance v0, Lcom/vividsolutions/jts/io/ParseException;

    new-instance v1, Ljava/lang/StringBuffer;

    invoke-direct {v1}, Ljava/lang/StringBuffer;-><init>()V

    const-string v2, "Invalid number: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    iget-object v2, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    iget-object v2, v2, Ljava/io/StreamTokenizer;->sval:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    invoke-virtual {v1}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/vividsolutions/jts/io/ParseException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    const-string v0, "number"

    .line 273
    invoke-direct {p0, v0}, Lcom/vividsolutions/jts/io/WKTReader;->parseError(Ljava/lang/String;)V

    const/4 v0, 0x0

    throw v0
.end method

.method private getNextWord()Ljava/lang/String;
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/vividsolutions/jts/io/ParseException;
        }
    .end annotation

    .line 341
    iget-object v0, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    invoke-virtual {v0}, Ljava/io/StreamTokenizer;->nextToken()I

    move-result v0

    const/4 v1, -0x3

    if-eq v0, v1, :cond_3

    const/16 v1, 0x2c

    if-eq v0, v1, :cond_2

    const/16 v1, 0x28

    if-eq v0, v1, :cond_1

    const/16 v1, 0x29

    if-ne v0, v1, :cond_0

    const-string v0, ")"

    return-object v0

    :cond_0
    const-string v0, "word"

    .line 354
    invoke-direct {p0, v0}, Lcom/vividsolutions/jts/io/WKTReader;->parseError(Ljava/lang/String;)V

    const/4 v0, 0x0

    throw v0

    :cond_1
    const-string v0, "("

    return-object v0

    :cond_2
    const-string v0, ","

    return-object v0

    .line 345
    :cond_3
    iget-object v0, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    iget-object v0, v0, Ljava/io/StreamTokenizer;->sval:Ljava/lang/String;

    const-string v1, "EMPTY"

    .line 346
    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_4

    return-object v1

    :cond_4
    return-object v0
.end method

.method private getPreciseCoordinate()Lcom/vividsolutions/jts/geom/Coordinate;
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/vividsolutions/jts/io/ParseException;
        }
    .end annotation

    .line 233
    new-instance v0, Lcom/vividsolutions/jts/geom/Coordinate;

    invoke-direct {v0}, Lcom/vividsolutions/jts/geom/Coordinate;-><init>()V

    .line 234
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextNumber()D

    move-result-wide v1

    iput-wide v1, v0, Lcom/vividsolutions/jts/geom/Coordinate;->x:D

    .line 235
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextNumber()D

    move-result-wide v1

    iput-wide v1, v0, Lcom/vividsolutions/jts/geom/Coordinate;->y:D

    .line 236
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->isNumberNext()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 237
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextNumber()D

    move-result-wide v1

    iput-wide v1, v0, Lcom/vividsolutions/jts/geom/Coordinate;->z:D

    .line 239
    :cond_0
    iget-object v1, p0, Lcom/vividsolutions/jts/io/WKTReader;->precisionModel:Lcom/vividsolutions/jts/geom/PrecisionModel;

    invoke-virtual {v1, v0}, Lcom/vividsolutions/jts/geom/PrecisionModel;->makePrecise(Lcom/vividsolutions/jts/geom/Coordinate;)V

    return-object v0
.end method

.method private isNumberNext()Z
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 244
    iget-object v0, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    invoke-virtual {v0}, Ljava/io/StreamTokenizer;->nextToken()I

    move-result v0

    .line 245
    iget-object v1, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    invoke-virtual {v1}, Ljava/io/StreamTokenizer;->pushBack()V

    const/4 v1, -0x3

    if-ne v0, v1, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    return v0
.end method

.method private parseError(Ljava/lang/String;)V
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/vividsolutions/jts/io/ParseException;
        }
    .end annotation

    .line 369
    iget-object v0, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    iget v0, v0, Ljava/io/StreamTokenizer;->ttype:I

    const/4 v1, 0x0

    const/4 v2, -0x2

    if-eq v0, v2, :cond_1

    const/16 v2, 0xa

    if-ne v0, v2, :cond_0

    const-string p1, "Unexpected EOL token"

    .line 372
    invoke-static {p1}, Lcom/vividsolutions/jts/util/Assert;->shouldNeverReachHere(Ljava/lang/String;)V

    throw v1

    .line 374
    :cond_0
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->tokenString()Ljava/lang/String;

    move-result-object v0

    .line 375
    new-instance v1, Lcom/vividsolutions/jts/io/ParseException;

    new-instance v2, Ljava/lang/StringBuffer;

    invoke-direct {v2}, Ljava/lang/StringBuffer;-><init>()V

    const-string v3, "Expected "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    invoke-virtual {v2, p1}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    const-string p1, " but found "

    invoke-virtual {v2, p1}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    invoke-virtual {v2, v0}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    invoke-virtual {v2}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {v1, p1}, Lcom/vividsolutions/jts/io/ParseException;-><init>(Ljava/lang/String;)V

    throw v1

    :cond_1
    const-string p1, "Unexpected NUMBER token"

    .line 370
    invoke-static {p1}, Lcom/vividsolutions/jts/util/Assert;->shouldNeverReachHere(Ljava/lang/String;)V

    throw v1
.end method

.method private readGeometryCollectionText()Lcom/vividsolutions/jts/geom/GeometryCollection;
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/vividsolutions/jts/io/ParseException;
        }
    .end annotation

    .line 630
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextEmptyOrOpener()Ljava/lang/String;

    move-result-object v0

    const-string v1, "EMPTY"

    .line 631
    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 632
    iget-object v0, p0, Lcom/vividsolutions/jts/io/WKTReader;->geometryFactory:Lcom/vividsolutions/jts/geom/GeometryFactory;

    const/4 v1, 0x0

    new-array v1, v1, [Lcom/vividsolutions/jts/geom/Geometry;

    invoke-virtual {v0, v1}, Lcom/vividsolutions/jts/geom/GeometryFactory;->createGeometryCollection([Lcom/vividsolutions/jts/geom/Geometry;)Lcom/vividsolutions/jts/geom/GeometryCollection;

    move-result-object v0

    return-object v0

    .line 634
    :cond_0
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 635
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->readGeometryTaggedText()Lcom/vividsolutions/jts/geom/Geometry;

    move-result-object v1

    .line 636
    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 637
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextCloserOrComma()Ljava/lang/String;

    move-result-object v1

    :goto_0
    const-string v2, ","

    .line 638
    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 639
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->readGeometryTaggedText()Lcom/vividsolutions/jts/geom/Geometry;

    move-result-object v1

    .line 640
    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 641
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextCloserOrComma()Ljava/lang/String;

    move-result-object v1

    goto :goto_0

    .line 643
    :cond_1
    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v1

    new-array v1, v1, [Lcom/vividsolutions/jts/geom/Geometry;

    .line 644
    iget-object v2, p0, Lcom/vividsolutions/jts/io/WKTReader;->geometryFactory:Lcom/vividsolutions/jts/geom/GeometryFactory;

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [Lcom/vividsolutions/jts/geom/Geometry;

    invoke-virtual {v2, v0}, Lcom/vividsolutions/jts/geom/GeometryFactory;->createGeometryCollection([Lcom/vividsolutions/jts/geom/Geometry;)Lcom/vividsolutions/jts/geom/GeometryCollection;

    move-result-object v0

    return-object v0
.end method

.method private readGeometryTaggedText()Lcom/vividsolutions/jts/geom/Geometry;
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/vividsolutions/jts/io/ParseException;
        }
    .end annotation

    const/4 v0, 0x0

    .line 412
    :try_start_0
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextWord()Ljava/lang/String;

    move-result-object v0
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Lcom/vividsolutions/jts/io/ParseException; {:try_start_0 .. :try_end_0} :catch_0

    const-string v1, "POINT"

    .line 419
    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 420
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->readPointText()Lcom/vividsolutions/jts/geom/Point;

    move-result-object v0

    return-object v0

    :cond_0
    const-string v1, "LINESTRING"

    .line 422
    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 423
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->readLineStringText()Lcom/vividsolutions/jts/geom/LineString;

    move-result-object v0

    return-object v0

    :cond_1
    const-string v1, "LINEARRING"

    .line 425
    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_2

    .line 426
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->readLinearRingText()Lcom/vividsolutions/jts/geom/LinearRing;

    move-result-object v0

    return-object v0

    :cond_2
    const-string v1, "POLYGON"

    .line 428
    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_3

    .line 429
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->readPolygonText()Lcom/vividsolutions/jts/geom/Polygon;

    move-result-object v0

    return-object v0

    :cond_3
    const-string v1, "MULTIPOINT"

    .line 431
    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_4

    .line 432
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->readMultiPointText()Lcom/vividsolutions/jts/geom/MultiPoint;

    move-result-object v0

    return-object v0

    :cond_4
    const-string v1, "MULTILINESTRING"

    .line 434
    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_5

    .line 435
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->readMultiLineStringText()Lcom/vividsolutions/jts/geom/MultiLineString;

    move-result-object v0

    return-object v0

    :cond_5
    const-string v1, "MULTIPOLYGON"

    .line 437
    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_6

    .line 438
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->readMultiPolygonText()Lcom/vividsolutions/jts/geom/MultiPolygon;

    move-result-object v0

    return-object v0

    :cond_6
    const-string v1, "GEOMETRYCOLLECTION"

    .line 440
    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_7

    .line 441
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->readGeometryCollectionText()Lcom/vividsolutions/jts/geom/GeometryCollection;

    move-result-object v0

    return-object v0

    .line 443
    :cond_7
    new-instance v1, Lcom/vividsolutions/jts/io/ParseException;

    new-instance v2, Ljava/lang/StringBuffer;

    invoke-direct {v2}, Ljava/lang/StringBuffer;-><init>()V

    const-string v3, "Unknown geometry type: "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    invoke-virtual {v2, v0}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    invoke-virtual {v2}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Lcom/vividsolutions/jts/io/ParseException;-><init>(Ljava/lang/String;)V

    throw v1

    :catch_0
    return-object v0
.end method

.method private readLineStringText()Lcom/vividsolutions/jts/geom/LineString;
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/vividsolutions/jts/io/ParseException;
        }
    .end annotation

    .line 477
    iget-object v0, p0, Lcom/vividsolutions/jts/io/WKTReader;->geometryFactory:Lcom/vividsolutions/jts/geom/GeometryFactory;

    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getCoordinates()[Lcom/vividsolutions/jts/geom/Coordinate;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/vividsolutions/jts/geom/GeometryFactory;->createLineString([Lcom/vividsolutions/jts/geom/Coordinate;)Lcom/vividsolutions/jts/geom/LineString;

    move-result-object v0

    return-object v0
.end method

.method private readLinearRingText()Lcom/vividsolutions/jts/geom/LinearRing;
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/vividsolutions/jts/io/ParseException;
        }
    .end annotation

    .line 495
    iget-object v0, p0, Lcom/vividsolutions/jts/io/WKTReader;->geometryFactory:Lcom/vividsolutions/jts/geom/GeometryFactory;

    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getCoordinates()[Lcom/vividsolutions/jts/geom/Coordinate;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/vividsolutions/jts/geom/GeometryFactory;->createLinearRing([Lcom/vividsolutions/jts/geom/Coordinate;)Lcom/vividsolutions/jts/geom/LinearRing;

    move-result-object v0

    return-object v0
.end method

.method private readMultiLineStringText()Lcom/vividsolutions/jts/geom/MultiLineString;
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/vividsolutions/jts/io/ParseException;
        }
    .end annotation

    .line 570
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextEmptyOrOpener()Ljava/lang/String;

    move-result-object v0

    const-string v1, "EMPTY"

    .line 571
    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 572
    iget-object v0, p0, Lcom/vividsolutions/jts/io/WKTReader;->geometryFactory:Lcom/vividsolutions/jts/geom/GeometryFactory;

    const/4 v1, 0x0

    new-array v1, v1, [Lcom/vividsolutions/jts/geom/LineString;

    invoke-virtual {v0, v1}, Lcom/vividsolutions/jts/geom/GeometryFactory;->createMultiLineString([Lcom/vividsolutions/jts/geom/LineString;)Lcom/vividsolutions/jts/geom/MultiLineString;

    move-result-object v0

    return-object v0

    .line 574
    :cond_0
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 575
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->readLineStringText()Lcom/vividsolutions/jts/geom/LineString;

    move-result-object v1

    .line 576
    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 577
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextCloserOrComma()Ljava/lang/String;

    move-result-object v1

    :goto_0
    const-string v2, ","

    .line 578
    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 579
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->readLineStringText()Lcom/vividsolutions/jts/geom/LineString;

    move-result-object v1

    .line 580
    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 581
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextCloserOrComma()Ljava/lang/String;

    move-result-object v1

    goto :goto_0

    .line 583
    :cond_1
    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v1

    new-array v1, v1, [Lcom/vividsolutions/jts/geom/LineString;

    .line 584
    iget-object v2, p0, Lcom/vividsolutions/jts/io/WKTReader;->geometryFactory:Lcom/vividsolutions/jts/geom/GeometryFactory;

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [Lcom/vividsolutions/jts/geom/LineString;

    invoke-virtual {v2, v0}, Lcom/vividsolutions/jts/geom/GeometryFactory;->createMultiLineString([Lcom/vividsolutions/jts/geom/LineString;)Lcom/vividsolutions/jts/geom/MultiLineString;

    move-result-object v0

    return-object v0
.end method

.method private readMultiPointText()Lcom/vividsolutions/jts/geom/MultiPoint;
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/vividsolutions/jts/io/ParseException;
        }
    .end annotation

    .line 509
    iget-object v0, p0, Lcom/vividsolutions/jts/io/WKTReader;->geometryFactory:Lcom/vividsolutions/jts/geom/GeometryFactory;

    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getCoordinates()[Lcom/vividsolutions/jts/geom/Coordinate;

    move-result-object v1

    invoke-direct {p0, v1}, Lcom/vividsolutions/jts/io/WKTReader;->toPoints([Lcom/vividsolutions/jts/geom/Coordinate;)[Lcom/vividsolutions/jts/geom/Point;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/vividsolutions/jts/geom/GeometryFactory;->createMultiPoint([Lcom/vividsolutions/jts/geom/Point;)Lcom/vividsolutions/jts/geom/MultiPoint;

    move-result-object v0

    return-object v0
.end method

.method private readMultiPolygonText()Lcom/vividsolutions/jts/geom/MultiPolygon;
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/vividsolutions/jts/io/ParseException;
        }
    .end annotation

    .line 599
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextEmptyOrOpener()Ljava/lang/String;

    move-result-object v0

    const-string v1, "EMPTY"

    .line 600
    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 601
    iget-object v0, p0, Lcom/vividsolutions/jts/io/WKTReader;->geometryFactory:Lcom/vividsolutions/jts/geom/GeometryFactory;

    const/4 v1, 0x0

    new-array v1, v1, [Lcom/vividsolutions/jts/geom/Polygon;

    invoke-virtual {v0, v1}, Lcom/vividsolutions/jts/geom/GeometryFactory;->createMultiPolygon([Lcom/vividsolutions/jts/geom/Polygon;)Lcom/vividsolutions/jts/geom/MultiPolygon;

    move-result-object v0

    return-object v0

    .line 603
    :cond_0
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 604
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->readPolygonText()Lcom/vividsolutions/jts/geom/Polygon;

    move-result-object v1

    .line 605
    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 606
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextCloserOrComma()Ljava/lang/String;

    move-result-object v1

    :goto_0
    const-string v2, ","

    .line 607
    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 608
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->readPolygonText()Lcom/vividsolutions/jts/geom/Polygon;

    move-result-object v1

    .line 609
    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 610
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextCloserOrComma()Ljava/lang/String;

    move-result-object v1

    goto :goto_0

    .line 612
    :cond_1
    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v1

    new-array v1, v1, [Lcom/vividsolutions/jts/geom/Polygon;

    .line 613
    iget-object v2, p0, Lcom/vividsolutions/jts/io/WKTReader;->geometryFactory:Lcom/vividsolutions/jts/geom/GeometryFactory;

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [Lcom/vividsolutions/jts/geom/Polygon;

    invoke-virtual {v2, v0}, Lcom/vividsolutions/jts/geom/GeometryFactory;->createMultiPolygon([Lcom/vividsolutions/jts/geom/Polygon;)Lcom/vividsolutions/jts/geom/MultiPolygon;

    move-result-object v0

    return-object v0
.end method

.method private readPointText()Lcom/vividsolutions/jts/geom/Point;
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/vividsolutions/jts/io/ParseException;
        }
    .end annotation

    .line 457
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextEmptyOrOpener()Ljava/lang/String;

    move-result-object v0

    const-string v1, "EMPTY"

    .line 458
    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 459
    iget-object v0, p0, Lcom/vividsolutions/jts/io/WKTReader;->geometryFactory:Lcom/vividsolutions/jts/geom/GeometryFactory;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/vividsolutions/jts/geom/GeometryFactory;->createPoint(Lcom/vividsolutions/jts/geom/Coordinate;)Lcom/vividsolutions/jts/geom/Point;

    move-result-object v0

    return-object v0

    .line 461
    :cond_0
    iget-object v0, p0, Lcom/vividsolutions/jts/io/WKTReader;->geometryFactory:Lcom/vividsolutions/jts/geom/GeometryFactory;

    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getPreciseCoordinate()Lcom/vividsolutions/jts/geom/Coordinate;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/vividsolutions/jts/geom/GeometryFactory;->createPoint(Lcom/vividsolutions/jts/geom/Coordinate;)Lcom/vividsolutions/jts/geom/Point;

    move-result-object v0

    .line 462
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextCloser()Ljava/lang/String;

    return-object v0
.end method

.method private readPolygonText()Lcom/vividsolutions/jts/geom/Polygon;
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/vividsolutions/jts/io/ParseException;
        }
    .end annotation

    .line 542
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextEmptyOrOpener()Ljava/lang/String;

    move-result-object v0

    const-string v1, "EMPTY"

    .line 543
    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 544
    iget-object v0, p0, Lcom/vividsolutions/jts/io/WKTReader;->geometryFactory:Lcom/vividsolutions/jts/geom/GeometryFactory;

    const/4 v1, 0x0

    new-array v2, v1, [Lcom/vividsolutions/jts/geom/Coordinate;

    invoke-virtual {v0, v2}, Lcom/vividsolutions/jts/geom/GeometryFactory;->createLinearRing([Lcom/vividsolutions/jts/geom/Coordinate;)Lcom/vividsolutions/jts/geom/LinearRing;

    move-result-object v2

    new-array v1, v1, [Lcom/vividsolutions/jts/geom/LinearRing;

    invoke-virtual {v0, v2, v1}, Lcom/vividsolutions/jts/geom/GeometryFactory;->createPolygon(Lcom/vividsolutions/jts/geom/LinearRing;[Lcom/vividsolutions/jts/geom/LinearRing;)Lcom/vividsolutions/jts/geom/Polygon;

    move-result-object v0

    return-object v0

    .line 547
    :cond_0
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 548
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->readLinearRingText()Lcom/vividsolutions/jts/geom/LinearRing;

    move-result-object v1

    .line 549
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextCloserOrComma()Ljava/lang/String;

    move-result-object v2

    :goto_0
    const-string v3, ","

    .line 550
    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_1

    .line 551
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->readLinearRingText()Lcom/vividsolutions/jts/geom/LinearRing;

    move-result-object v2

    .line 552
    invoke-virtual {v0, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 553
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->getNextCloserOrComma()Ljava/lang/String;

    move-result-object v2

    goto :goto_0

    .line 555
    :cond_1
    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v2

    new-array v2, v2, [Lcom/vividsolutions/jts/geom/LinearRing;

    .line 556
    iget-object v3, p0, Lcom/vividsolutions/jts/io/WKTReader;->geometryFactory:Lcom/vividsolutions/jts/geom/GeometryFactory;

    invoke-virtual {v0, v2}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [Lcom/vividsolutions/jts/geom/LinearRing;

    invoke-virtual {v3, v1, v0}, Lcom/vividsolutions/jts/geom/GeometryFactory;->createPolygon(Lcom/vividsolutions/jts/geom/LinearRing;[Lcom/vividsolutions/jts/geom/LinearRing;)Lcom/vividsolutions/jts/geom/Polygon;

    move-result-object v0

    return-object v0
.end method

.method private toPoints([Lcom/vividsolutions/jts/geom/Coordinate;)[Lcom/vividsolutions/jts/geom/Point;
    .locals 5

    .line 522
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    const/4 v1, 0x0

    const/4 v2, 0x0

    .line 523
    :goto_0
    array-length v3, p1

    if-ge v2, v3, :cond_0

    .line 524
    iget-object v3, p0, Lcom/vividsolutions/jts/io/WKTReader;->geometryFactory:Lcom/vividsolutions/jts/geom/GeometryFactory;

    aget-object v4, p1, v2

    invoke-virtual {v3, v4}, Lcom/vividsolutions/jts/geom/GeometryFactory;->createPoint(Lcom/vividsolutions/jts/geom/Coordinate;)Lcom/vividsolutions/jts/geom/Point;

    move-result-object v3

    invoke-virtual {v0, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 526
    :cond_0
    new-array p1, v1, [Lcom/vividsolutions/jts/geom/Point;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    move-result-object p1

    check-cast p1, [Lcom/vividsolutions/jts/geom/Point;

    return-object p1
.end method

.method private tokenString()Ljava/lang/String;
    .locals 3

    .line 385
    iget-object v0, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    iget v0, v0, Ljava/io/StreamTokenizer;->ttype:I

    const/4 v1, -0x3

    const-string v2, "\'"

    if-eq v0, v1, :cond_3

    const/4 v1, -0x2

    if-eq v0, v1, :cond_2

    const/4 v1, -0x1

    if-eq v0, v1, :cond_1

    const/16 v1, 0xa

    if-eq v0, v1, :cond_0

    .line 393
    new-instance v0, Ljava/lang/StringBuffer;

    invoke-direct {v0}, Ljava/lang/StringBuffer;-><init>()V

    invoke-virtual {v0, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    iget-object v1, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    iget v1, v1, Ljava/io/StreamTokenizer;->ttype:I

    int-to-char v1, v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;

    invoke-virtual {v0, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    invoke-virtual {v0}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0

    :cond_0
    const-string v0, "End-of-Line"

    return-object v0

    :cond_1
    const-string v0, "End-of-Stream"

    return-object v0

    :cond_2
    const-string v0, "<NUMBER>"

    return-object v0

    .line 391
    :cond_3
    new-instance v0, Ljava/lang/StringBuffer;

    invoke-direct {v0}, Ljava/lang/StringBuffer;-><init>()V

    invoke-virtual {v0, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    iget-object v1, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    iget-object v1, v1, Ljava/io/StreamTokenizer;->sval:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    invoke-virtual {v0, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    invoke-virtual {v0}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method


# virtual methods
.method public read(Ljava/io/Reader;)Lcom/vividsolutions/jts/geom/Geometry;
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/vividsolutions/jts/io/ParseException;
        }
    .end annotation

    .line 179
    new-instance v0, Ljava/io/StreamTokenizer;

    invoke-direct {v0, p1}, Ljava/io/StreamTokenizer;-><init>(Ljava/io/Reader;)V

    iput-object v0, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    .line 181
    iget-object p1, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    invoke-virtual {p1}, Ljava/io/StreamTokenizer;->resetSyntax()V

    .line 182
    iget-object p1, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    const/16 v0, 0x61

    const/16 v1, 0x7a

    invoke-virtual {p1, v0, v1}, Ljava/io/StreamTokenizer;->wordChars(II)V

    .line 183
    iget-object p1, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    const/16 v0, 0x41

    const/16 v1, 0x5a

    invoke-virtual {p1, v0, v1}, Ljava/io/StreamTokenizer;->wordChars(II)V

    .line 184
    iget-object p1, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    const/16 v0, 0xa0

    const/16 v1, 0xff

    invoke-virtual {p1, v0, v1}, Ljava/io/StreamTokenizer;->wordChars(II)V

    .line 185
    iget-object p1, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    const/16 v0, 0x30

    const/16 v1, 0x39

    invoke-virtual {p1, v0, v1}, Ljava/io/StreamTokenizer;->wordChars(II)V

    .line 186
    iget-object p1, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    const/16 v0, 0x2d

    invoke-virtual {p1, v0, v0}, Ljava/io/StreamTokenizer;->wordChars(II)V

    .line 187
    iget-object p1, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    const/16 v0, 0x2b

    invoke-virtual {p1, v0, v0}, Ljava/io/StreamTokenizer;->wordChars(II)V

    .line 188
    iget-object p1, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    const/16 v0, 0x2e

    invoke-virtual {p1, v0, v0}, Ljava/io/StreamTokenizer;->wordChars(II)V

    .line 189
    iget-object p1, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    const/4 v0, 0x0

    const/16 v1, 0x20

    invoke-virtual {p1, v0, v1}, Ljava/io/StreamTokenizer;->whitespaceChars(II)V

    .line 190
    iget-object p1, p0, Lcom/vividsolutions/jts/io/WKTReader;->tokenizer:Ljava/io/StreamTokenizer;

    const/16 v0, 0x23

    invoke-virtual {p1, v0}, Ljava/io/StreamTokenizer;->commentChar(I)V

    .line 193
    :try_start_0
    invoke-direct {p0}, Lcom/vividsolutions/jts/io/WKTReader;->readGeometryTaggedText()Lcom/vividsolutions/jts/geom/Geometry;

    move-result-object p1
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    return-object p1

    :catch_0
    move-exception p1

    .line 196
    new-instance v0, Lcom/vividsolutions/jts/io/ParseException;

    invoke-virtual {p1}, Ljava/io/IOException;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {v0, p1}, Lcom/vividsolutions/jts/io/ParseException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method public read(Ljava/lang/String;)Lcom/vividsolutions/jts/geom/Geometry;
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/vividsolutions/jts/io/ParseException;
        }
    .end annotation

    .line 160
    new-instance v0, Ljava/io/StringReader;

    invoke-direct {v0, p1}, Ljava/io/StringReader;-><init>(Ljava/lang/String;)V

    .line 162
    :try_start_0
    invoke-virtual {p0, v0}, Lcom/vividsolutions/jts/io/WKTReader;->read(Ljava/io/Reader;)Lcom/vividsolutions/jts/geom/Geometry;

    move-result-object p1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 165
    invoke-virtual {v0}, Ljava/io/StringReader;->close()V

    return-object p1

    :catchall_0
    move-exception p1

    invoke-virtual {v0}, Ljava/io/StringReader;->close()V

    throw p1
.end method
